Xceed .NET Libraries Documentation
Xceed.Ftp Assembly / Xceed.Ftp Namespace / QuickFtp Class / GetFtpContents Method / GetFtpContents(String,Int32,AuthenticationMethod,VerificationFlags,Certificate,DataChannelProtection,Boolean,String,Boolean,String[]) Method
The hostname of the FTP server to connect to. An IP address can also be used.
The port of the FTP server to which to connect to. If 0 is passed, 990 is used if implicitAuthentication is true; otherwise, 21 is used.
The authentication method to use when connecting to the FTP server.
The verification flags used to verify the FTP server's certificate.
The certificate used when connecting to the FTP server. Can be null.
The DataChannelProtection used during the communication. Ignored if implicitAuthentication is true.
If true, the SSL handshake occurs at the very beginning of the connection; otherwise, the AUTH command is sent after the Welcome message to initiate the SSL handshake.
The path to the remote folder to list, for example, \ftproot\test.
Boolean value indicating if files contained within sub-folders should be listed from the FTP host.
The filters to apply for the GetFtpContents.


In This Topic
    GetFtpContents(String,Int32,AuthenticationMethod,VerificationFlags,Certificate,DataChannelProtection,Boolean,String,Boolean,String[]) Method
    In This Topic
    Gets a listing of the provided remote folder, specifying a port, an authentication method, a certificate, data channel protection, filters, and whether authentication is implicit and whether the operation is recursive.
    Syntax
    'Declaration
     
    Public Overloads Shared Function GetFtpContents( _
       ByVal hostname As String, _
       ByVal port As Integer, _
       ByVal authenticationMethod As AuthenticationMethod, _
       ByVal verificationFlags As VerificationFlags, _
       ByVal clientCertificate As Certificate, _
       ByVal dataChannelProtection As DataChannelProtection, _
       ByVal implicitAuthentication As Boolean, _
       ByVal remoteFolderToList As String, _
       ByVal recursive As Boolean, _
       ByVal ParamArray filters() As String _
    ) As QuickFtpItem()
    'Usage
     
    Dim hostname As String
    Dim port As Integer
    Dim authenticationMethod As AuthenticationMethod
    Dim verificationFlags As VerificationFlags
    Dim clientCertificate As Certificate
    Dim dataChannelProtection As DataChannelProtection
    Dim implicitAuthentication As Boolean
    Dim remoteFolderToList As String
    Dim recursive As Boolean
    Dim filters() As String
    Dim value() As QuickFtpItem
     
    value = QuickFtp.GetFtpContents(hostname, port, authenticationMethod, verificationFlags, clientCertificate, dataChannelProtection, implicitAuthentication, remoteFolderToList, recursive, filters)

    Parameters

    hostname
    The hostname of the FTP server to connect to. An IP address can also be used.
    port
    The port of the FTP server to which to connect to. If 0 is passed, 990 is used if implicitAuthentication is true; otherwise, 21 is used.
    authenticationMethod
    The authentication method to use when connecting to the FTP server.
    verificationFlags
    The verification flags used to verify the FTP server's certificate.
    clientCertificate
    The certificate used when connecting to the FTP server. Can be null.
    dataChannelProtection
    The DataChannelProtection used during the communication. Ignored if implicitAuthentication is true.
    implicitAuthentication
    If true, the SSL handshake occurs at the very beginning of the connection; otherwise, the AUTH command is sent after the Welcome message to initiate the SSL handshake.
    remoteFolderToList
    The path to the remote folder to list, for example, \ftproot\test.
    recursive
    Boolean value indicating if files contained within sub-folders should be listed from the FTP host.
    filters
    The filters to apply for the GetFtpContents.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also